using UnityEngine;

public class EntityInputSystem : MonoBehaviour
{
    void Update()
    {
		if (Input.GetMouseButtonUp(1))
		{
            bool flag = Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition),
                out RaycastHit hit, 100, 1 << LayerMask.NameToLayer("Scene"));
            if (!flag) return;
            var moveSystem = gameObject.GetComponent<MoveSystem>();
            if (moveSystem == null) return;
            moveSystem.SetDestination(hit.point);
		}
    }
}
